<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="__CSS__/bootstrap.min.css" />
<link rel="stylesheet" href="__CSS__/bootstrap-responsive.min.css" />
<link rel="stylesheet" href="__CSS__/uniform.css" />
<link rel="stylesheet" href="__CSS__/select2.css" />
<link rel="stylesheet" href="__CSS__/matrix-style2.css" />
<link rel="stylesheet" href="__CSS__/matrix-media.css" />
<link href="__FONT__/css/font-awesome.css" rel="stylesheet" />
<link rel="stylesheet" href="__CSS__/changyun.css" />
<style>
	.control-group .controls label{
		display:inline-block;
	}
</style>
</head>
<body>
<div id="content">

  <include file="Public/maintop" />

  <div class="container-fluid">
    <div class="row-fluid">
      <div class="span12">
        
        <div class="widget-box">
          <div class="widget-content tab-content">
            <div id="tab1" class="tab-pane active">
				<div class="widget-content nopadding">
				  <form action="__ACTION__" method="post" class="form-horizontal" id="form_basic_validate">
					<div class="control-group">
					  <label class="control-label">用户名 :</label>
					  <div class="controls">
						<input type="text" class="span3" name="user_login" value="{#$info.user_login}" disabled  datatype="*2-50" nullmsg="用户名会作为默认的昵称" errormsg="用户名会作为默认的昵称(2-50位)"  sucmsg="验证通过！"/>
						<div class="Validform_checktip">用户名会作为默认的昵称</div>
					  </div>
					</div>
					<div class="control-group">
					  <label class="control-label">密码 :</label>
					  <div class="controls">
						<input type="password" class="span3" name="user_pass" value=""   />
						<div class="Validform_checktip">为空则不修改密码</div>
					  </div>
					</div>
					<div class="control-group">
					  <label class="control-label">确认密码 :</label>
					  <div class="controls">
						<input type="password"  class="span3" name="m_user_pass" value=""  />
						<div class="Validform_checktip">请输入确认密码</div>
					  </div>
					</div>
					<div class="control-group">
					  <label class="control-label">用户邮箱 :</label>
					  <div class="controls">
						<input type="text" class="span3" name="user_email" value="{#$info.user_email}" />
						<div class="Validform_checktip">用户邮箱</div>
					  </div>
					</div>
					<div class="control-group">
					  <label class="control-label">用户手机 :</label>
					  <div class="controls">
						<input type="text" class="span3" name="mobile" value="{#$info.mobile}" />
						<div class="Validform_checktip">用户手机</div>
					  </div>
					</div>

<!--				  <div class="control-group" >-->
<!--					  <label class="control-label">绑定城市 :</label>-->
<!--					  <div class="controls" id="city_4">-->
<!--						  <select name="u_province" class="prov"></select>-->
<!--						  <select name="u_city" class="city" disabled="disabled"></select>-->
<!--						  <select name="u_district" class="dist" disabled="disabled"></select>-->
<!--					  </div>-->
<!--				  </div>-->
					  
					<div class="form-actions">
					  <input type="hidden" name="id" value="{#$info.id|default=''}">
					  <button type="submit" class="btn btn-success">保存</button>
					</div>
				  </form>
				</div>

            </div>
          </div>
        </div>
		
      </div>
    </div>
    <hr>
    </div>
  </div>
</div>
<script src="__JS__/jquery.min.js"></script> 
<script src="__JS__/bootstrap.min.js"></script>
<script src="__JS__/jquery.ui.custom.js"></script>
<script src="__JS__/jquery.uniform.js"></script>
<script src="__JS__/select2.min.js"></script> 
<script src="__JS__/matrix.js"></script>
<script src="__PUBLIC__/js/layer/layer.js"></script>
<script src="__PUBLIC__/js/Validform.min.js"></script>
<script>
	var city_js_root = "__PUBLIC__/citySelect/";
</script>
<script type="text/javascript" src="__PUBLIC__/citySelect/jquery.cityselect.js"></script>
<script>
	$("#city_4").citySelect({
		prov: "{#$info.u_province}",
		city: "{#$info.u_city}",
		dist: "{#$info.u_district}",
		required: false
	});
</script>
<script type="text/javascript">
$(function(){
	$('input[type=checkbox],input[type=radio],input[type=file]').uniform();
	//$('select').select2();
	var loadi = null;
	var demo1 = $("#form_basic_validate").Validform({
		tiptype:3,
		ajaxPost:true,
		postonce:true,
		tiptype: function (msg, o, cssctl) {
			if (!o.obj.is("form")) {
				var objtip=o.obj.siblings(".Validform_checktip");
				cssctl(objtip,o.type);
				objtip.text(msg);
			}
		},
		beforeSubmit:function(curform){
			loadi = layer.load('表单正在处理中，请稍等 ...');
			//layer.load('表单正在处理中，请稍等 ...');
			//在验证成功后，表单提交前执行的函数，curform参数是当前表单对象。
			//这里明确return false的话表单将不会提交;
		},
		callback:function(data){
			layer.close(loadi);
			if(data.status == 1){
				layer.alert(data.msg,{icon:1},function(){
					window.location.reload();
				});
			}else{
				layer.alert(data.msg,{icon:0});
			}
			//返回数据data是json对象，{"info":"demo info","status":"y"}
			//info: 输出提示信息;
			//status: 返回提交数据的状态,是否提交成功。如可以用"y"表示提交成功，"n"表示提交失败，在ajax_post.php文件返回数据里自定字符，主要用在callback函数里根据该值执行相应的回调操作;
			//你也可以在ajax_post.php文件返回更多信息在这里获取，进行相应操作；
			//ajax遇到服务端错误时也会执行回调，这时的data是{ status:**, statusText:**, readyState:**, responseText:** }；

			//这里执行回调操作;
			//注意：如果不是ajax方式提交表单，传入callback，这时data参数是当前表单对象，回调函数会在表单验证全部通过后执行，然后判断是否提交表单，如果callback里明确return false，则表单不会提交，如果return true或没有return，则会提交表单。
		}
	});

})
</script>

</body>
</html>
